﻿@extends('app')
@section('content')
 <style>
	.table th, .table td { 
		text-align: center; 
		height:38px;
	}
</style>
<div class="container">
	<div class="row">
		<div class="col-md-10 col-md-offset-1">
			<div class="panel panel-default">
				<div class="panel-heading">任务管理</div>

				<div class="panel-body">
				<table class="table table-striped">
					<thead>
					  <tr>
						 <th>名称</th>
						 <th>状态</th>
						 <th>操作</th>
					  </tr>
				   </thead>
				   <tbody>
				    @foreach ($tasks as $task)
					  <tr>
						 <td style="width:60%;">{{ $task->name }}</td>
						 <td style="width:10%;">
						 <?php 
							switch($task->status){
								case 0: echo '选标中';break;
								case 1: echo '沟通';break;
								case 2: echo '开发';break;
								case 3: echo '成功';break;
								default:echo '仲裁';
							}
						 ?>
						 <td style="width:30%;">
							<a href="{{ URL('/task/'.$task->id.'/show') }}" class="btn btn-primary">查看</a>
							<a href="{{ URL('admin/pages/'.$task->id.'/edit') }}" class="btn btn-success">标书</a>
							<a href="{{ URL('admin/pages/'.$task->id.'/edit') }}" class="btn btn-info">评价</a>
							<a href="{{ URL('admin/pages/'.$task->id.'/edit') }}" class="btn btn-danger">关闭</a>
							
						 </td>
					  </tr>
					  @endforeach
					 
				   </tbody>
				</table>
					<?php echo $tasks->render(); ?>
					  
				</div>
			</div>
		</div>
	</div>
</div>
@endsection